# !/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np

if __name__ == '__main__':
    a = np.array([1, 2, 3])
    print(a)    # [1 2 3]

    # 求(当前元素-最小值/最大值-最小值) [0.  0.5 1. ]
    a = (a - a.min()) / (a.max() - a.min())
    print(a)

    '''
        [[1 2]
        [3 4]]
    '''
    a = np.array([[1, 2], [3, 4]])
    print(a)

    a = np.array([1, 2, 3, 4, 5], ndmin=2)
    print(a)    # [[1 2 3 4 5]]

    a = np.array([1, 2, 3], dtype=complex)
    print(a)    # [1.+0.j 2.+0.j 3.+0.j]

